var util = require("util");

function Base () {
	this.name = "base";
	this.base = 1991;

	this.sayHello = function() {
		console.log("Hello " + this.name);
	};
}

Base.prototype.showName = function() {
	console.log(this.name);
};

function Sub() {
	this.name = "Sub";
}

util.inherits(Sub, Base);

var objBase = new Base();
objBase.showName();
objBase.sayHello();
console.log(objBase);

var objSub = new Sub();
objSub.showName();
// objSub.sayHello();
console.log(objSub);

function Person () {
	this.name = "aurogon";

	this.setName = function (name) {
		this.name = name;
	}

	this.toString = function () {
		return this.name;
	}
}

var person = new Person();
person.setName("maple");
console.log(util.inspect(person));
console.log(util.inspect(person, true));
